import { Component } from "react";
import {
  BrowserRouter as Router,
  Route,
  Switch,
  Redirect,
} from "react-router-dom";

import "layout/app-main.css";
import Login from "views/login/login";
import AppMain from "layout/app-main";



export default class MainRouter extends Component {

  // 此处渲染 第一层路由

  render() {
    return (
      <Router>
        <Switch>
          <Route path="/login" component={Login}></Route>
          <Route path="/app" component={AppMain}></Route>
          <Redirect path="/" to="/app"></Redirect>
        </Switch>
      </Router>
    );
  }
}
